package com.team.service.impl;

import com.team.mapper.AppVersionMapper;
import com.team.pojo.AppVersion;
import com.team.service.AppVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AppVersionServiceImpl implements AppVersionService {
 @Autowired(required = false)
 private AppVersionMapper appVersionMapper;

 @Override
 public List<AppVersion> getVersionByAppId(Long id) {
  return appVersionMapper.getVersionByAppId(id);
 }

 @Override
 public int addAppVersion(AppVersion appVersion) {
  return appVersionMapper.insertSelective(appVersion);
 }
 @Override
 public AppVersion getLastAppVersion(Long id) {
  return appVersionMapper.getLastVersionByAppId(id);
 }
}
